package com.bosssoft.feign;

import com.bosssoft.feign.impl.DepartmentFeignServiceImpl;
import com.bosssoft.response.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author Li kexi
 * Created on 2021/8/23.17:11
 */
@Component
@FeignClient(value = "account-provider",fallback = DepartmentFeignServiceImpl.class)
public interface DepartmentFeignService {

    @PostMapping(value = "/selectChildrenIds", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    List<Long> selectChildrenIds(Long deptId);

    @PostMapping(value = "/selectChildrenPage",consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    Result selectChildrenPage(@RequestParam(defaultValue = "1")Integer current,
                              @RequestParam(defaultValue = "10")Integer size, Long deptId);
}
